<template>
  <div class="column">
    <router-view/>
    <div class="panelAll" >
      <div class="boxb3"><h2>重点服务业企业销售完成情况(年销售亿元以上企业)</h2></div>
      <v-table :model="0" :header="this.header" :body="this.body"/>
      <div class="panelSmLonggy-foot"></div>
    </div>
  </div>
</template>

<script>


export default {
  name: "my9",
  mounted() {
    this.$parent.reverseColor9();
  },
  computed: {
    year() {
      return this.$store.year
    },
    month() {
      return this.$store.month
    }
  },
  watch: {
    '$store.time': {
      immediate: true,
      deep: true,
      handler(v) {
        this.getdata()
      }
    }
  },
  methods: {
    getdata() {
      // axios.get('http://localhost:28080/tradeAndService/getCompletionOfServiceIndustry', {
      //   params: {
      //     year: this.year,
      //     month:this.month,
      //   }
      // }).then(res => {
      this.$util.http.get('/excel/15/info/'+ this.year + '/' + this.month).then(res=>{
        for(var i =0;i<res.data.length;i++){
          res.data[i].id = i+1
        }
        this.body = res.data
        this.header[3].name = this.month+''+'月当月(万元)'
        this.header[4].name = this.month+''+'月止累计(万元)'
      })
    },
  },

  data() {
    return {
      header: [
        {
          name: "序号",
          value: "id",
        },
        {
          name: "所属行业",
          value: "sectorname",
        },
        {
          name: "企业名称",
          value: "name",
        },
        {
          name: "8月当月(万元)",
          value: "currentmonth",
        },
        {
          name: "8月止累计(万元)",
          value: "currentaccumulate",
        },
        {
          name: "同比±%",
          value: "monthonmonth1",
        },
      ],


      body: [],
    }
  }
}
</script>

<style scoped>

</style>